<template>
	<div id="app" class="weui-tab" v-if="show">
		<div class="weui-tab__bd">
			<div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
				<header class="demos-header"><span class="header-title">掌上水务</span></header>
				<div class="weui-grids">
					<navigator url="/pages/charge/index" class="weui-grid js_grid">
						<div class="weui-grid__icon"><img src="static/pay-logo.png" alt=""></div>
						<p class="weui-grid__label"> 户表缴费 </p>
					</navigator>
					<navigator url="/pages/price/index" class="weui-grid js_grid" link="">
						<div class="weui-grid__icon"><img src="static/info-logo.png" alt=""></div>
						<p class="weui-grid__label"> 水价信息 </p>
					</navigator>
					<navigator url="/pages/notice/index" class="weui-grid js_grid" link="">
						<div class="weui-grid__icon"><img src="static/notice-logo.png" alt=""></div>
						<p class="weui-grid__label"> 通知公告 </p>
					</navigator>
					<navigator url="/pages/chargelog/index" class="weui-grid js_grid" link="">
						<div class="weui-grid__icon"><img src="static/bill-logo.png" alt=""></div>
						<p class="weui-grid__label"> 缴费记录 </p>
					</navigator>
					<navigator url="/pages/sms/index" class="weui-grid js_grid" link="">
						<div class="weui-grid__icon"><img src="static/msg-logo.png" alt=""></div>
						<p class="weui-grid__label"> 短信记录 </p>
					</navigator>
					<navigator url="/pages/chargelog/bill" class="weui-grid js_grid" link="">
						<div class="weui-grid__icon"><img src="static/year-logo.png" alt=""></div>
						<p class="weui-grid__label"> 周期账单 </p>
					</navigator>
				</div><br><br>
			</div>
		</div>
		<div class="weui-tabbar">
			<navigator url="/pages/index/index" class="weui-tabbar__item weui-bar__item--on router-link-active">
				<div class="weui-tabbar__icon"><img src="static/home-logo.png" alt=""></div>
				<p class="weui-tabbar__label">首页</p>
			</navigator>
		</div>
	</div>
</template>


<script>
	export default {
		components: {
			
		},
		data() {
			return {
				show: false
			}
		},
		onLoad() {
			var _this=this;
			this.show=false
			uni.showLoading({
				title:"登录中"
			})
			setTimeout(()=>{
				this.$util.checkLogin(function(token){
					if(token!=null){
						uni.hideLoading()
						_this.show=true
					}else{
						uni.hideLoading()
						uni.showToast({
							title: '服务器错误!',
							icon:"error"
						});
						_this.show=true
					}
				})
			},500)
		},
		methods: {
			
			

		}
	}
</script>


<style lang="scss" scoped>

</style>
